{yun:}include file="$wapstyle/member/cheader.htm"{/yun}
<style>
	body{ background:#fff}
	.yun_footer{ display:none}
</style>

<div class="yun_com_msg">说明：<br>1、分配数量请小于可分配的数量；否则无法成功分配<br>2、时间会员可分配套餐为：职位置顶、职位推荐、紧急招聘</div>

<div class="clear"></div>

<form action="" method="post" id="editchildForm" onsubmit="return check_assignchildmsg();">
	
	<div>

		<div class="child_cont">
			
			<div class="child_data_list">
				<div class="child_data_z">主账号可分配</div>
				<div class="child_data_zi">子账号</div>
				<div class="child_data_name">分配数</div>
			</div>

			<div class="child_data_list assignDiv">
				<div class="child_name">发布职位：</div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.fathers.job_num{/yun}</span></div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.sons.job_num{/yun}</span></div>
				<div class="child_list_b">
					{yun:}if $statisAccount.fathers.rating_type==1{/yun}
					<span class="child_data child_data_bg">
						<input type="text" name="job_num" value="0" autocomplete="off" class="distribution_setmeal_span numCheck">
					</span>
					{yun:}else{/yun}
					<span class="child_data child_data_bg_jt">0</span>	
					{yun:}/if{/yun}
				</div>
			</div>

			<div class="child_data_list assignDiv">
				<div class="child_name">刷新职位：</div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.fathers.breakjob_num{/yun}</span></div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.sons.breakjob_num{/yun}</span></div>
				<div class="child_list_b">
					{yun:}if $statisAccount.fathers.rating_type==1{/yun}
					<span class="child_data child_data_bg">
						<input type="text" name="breakjob_num" value="0" autocomplete="off" class="distribution_setmeal_span numCheck">
					</span>
					{yun:}else{/yun}
					<span class="child_data child_data_bg_jt">0</span>	
					{yun:}/if{/yun}
				</div>
			</div>

			<div class="child_data_list assignDiv">
				<div class="child_name">下载简历：</div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.fathers.down_resume{/yun}</span></div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.sons.down_resume{/yun}</span></div>
				<div class="child_list_b">
					{yun:}if $statisAccount.fathers.rating_type==1{/yun}
					<span class="child_data child_data_bg">
						<input type="text" name="down_resume" value="0" autocomplete="off" class="distribution_setmeal_span numCheck">
					</span>
					{yun:}else{/yun}
					<span class="child_data child_data_bg_jt">0</span>	
					{yun:}/if{/yun}
				</div>
			</div>

			<div class="child_data_list assignDiv">
				<div class="child_name">邀请面试：</div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.fathers.invite_resume{/yun}</span></div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.sons.invite_resume{/yun}</span></div>
				<div class="child_list_b">
					{yun:}if $statisAccount.fathers.rating_type==1{/yun}
					<span class="child_data child_data_bg">
						<input type="text" name="invite_resume" value="0" autocomplete="off" class="distribution_setmeal_span numCheck">
					</span>
					{yun:}else{/yun}
					<span class="child_data child_data_bg_jt">0</span>	
					{yun:}/if{/yun}
				</div>
			</div>

			<div class="child_data_list assignDiv">
				<div class="child_name">招聘会报名：</div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.fathers.zph_num{/yun}</span></div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.sons.zph_num{/yun}</span></div>
				<div class="child_list_b">
					{yun:}if $statisAccount.fathers.rating_type==1{/yun}
					<span class="child_data child_data_bg">
						<input type="text" name="zph_num" value="0" autocomplete="off" class="distribution_setmeal_span numCheck">
					</span>
					{yun:}else{/yun}
					<span class="child_data child_data_bg_jt">0</span>	
					{yun:}/if{/yun}
				</div>
			</div>

			<div class="child_data_list assignDiv">
				<div class="child_name">职位置顶：</div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.fathers.top_num{/yun}</span></div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.sons.top_num{/yun}</span></div>
				<div class="child_list_b">
					<span class="child_data child_data_bg">
						<input type="text" name="top_num" value="0" autocomplete="off" class="distribution_setmeal_span numCheck">
					</span>
				</div>
			</div>

			<div class="child_data_list assignDiv">
				<div class="child_name">职位紧急：</div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.fathers.urgent_num{/yun}</span></div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.sons.urgent_num{/yun}</span></div>
				<div class="child_list_b">
					<span class="child_data child_data_bg">
						<input type="text" name="urgent_num" value="0" autocomplete="off" class="distribution_setmeal_span numCheck">
					</span>
				</div>
			</div>

			<div class="child_data_list assignDiv">
				<div class="child_name">职位推荐：</div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.fathers.rec_num{/yun}</span></div>
				<div class="child_list_b"><span class="child_data child_data_jt">{yun:}$statisAccount.sons.rec_num{/yun}</span></div>
				<div class="child_list_b">
					<span class="child_data child_data_bg">
						<input type="text" name="rec_num" value="0" autocomplete="off" class="distribution_setmeal_span numCheck">
					</span>
				</div>
			</div>

		</div>

		<div class="child_fot">
			<div class="child_fot_c">
				<input type="hidden" name="cuid" id="assignChildValId" value="{yun:}$smarty.get.cuid{/yun}">
				<input type="submit" name="submit" value="确认" class="child_fot_bth">
			</div>
		</div>

	</div>

</form>

<script>

	$('.numCheck').on('keyup', function () {
		$(this).val($(this).val().replace(/[^0-9.]/g, ''));
	});

	function check_assignchildmsg(){

		if ($('#assignChildValId').val() == 0) {
			layermsg('数据错误！');
			return false;
		}

		//判断输入的分配数量		
		$.each($('.assignDiv'), function(ak, av){

			var itemStr	=	$(av).find('.child_name').text();
			
			var zhuVal	=	parseInt($($(av).find('span')[0]).html());
			var sonVal	=	parseInt($($(av).find('span')[1]).html());
			var fenVal	=	parseInt($($(av).find('input[type=text]')).val());
			 
			if(fenVal > zhuVal){

				layermsg(itemStr+'分配的数量大于可分配的数量！');
				
				return false;
			}

		});

	}
</script> 
{yun:}include file="$wapstyle/footer.htm"{/yun}